package com.sky.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
@ApiModel(description = "用户注册时传递的数据模型")
public class EmployeeDTO implements Serializable {

    @ApiModelProperty("ID")
    private Long id;

    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty("用户名")
    private String username;

    @NotBlank(message = "姓名不能为空")
    @ApiModelProperty("姓名")
    private String name;

    @NotBlank(message = "手机号不能为空")
    @Size(min = 11,max = 11,message = "手机号码格式不对")
    @ApiModelProperty("手机号")
    private String phone;

    @NotBlank(message = "性别不能为空")
    @Range(min = 0,max = 1 ,message = "性别有误")
    @ApiModelProperty("性别")
    private String sex;

    @NotBlank(message = "身份证不能为空")
    @Size(min = 18,max = 18,message = "身份证字段错误")
    @ApiModelProperty("身份证")
    private String idNumber;


}
